<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-alpha.65">
<title data-react-helmet="true">9.11 高级查询操作 | Fur</title><meta data-react-helmet="true" name="docsearch:version" content="current,latest"><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"><meta data-react-helmet="true" property="og:title" content="9.11 高级查询操作 | Fur"><meta data-react-helmet="true" name="description" content="9.11.1 关联数据模型"><meta data-react-helmet="true" property="og:description" content="9.11.1 关联数据模型"><meta data-react-helmet="true" property="og:url" content="https://furos.cn/docs/dbcontext-hight-query"><link data-react-helmet="true" rel="shortcut icon" href="/img/favicon.ico"><link data-react-helmet="true" rel="canonical" href="https://furos.cn/docs/dbcontext-hight-query"><link rel="stylesheet" href="/styles.8aef5b7b.css">
<link rel="preload" href="/styles.8352e18a.js" as="script">
<link rel="preload" href="/runtime~main.98e14d7d.js" as="script">
<link rel="preload" href="/main.04e1b7d6.js" as="script">
<link rel="preload" href="/1.72c59440.js" as="script">
<link rel="preload" href="/2.a2e0b0a9.js" as="script">
<link rel="preload" href="/3.054f69af.js" as="script">
<link rel="preload" href="/1be78505.da78ff7d.js" as="script">
<link rel="preload" href="/85.0018927c.js" as="script">
<link rel="preload" href="/f976f453.e1be0e0e.js" as="script">
<link rel="preload" href="/17896441.9aece880.js" as="script">
<link rel="preload" href="/4bfcf3ee.d70edafe.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><div aria-label="Navigation bar toggle" class="navbar__toggle" role="button" tabindex="0"><svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></div><a class="navbar__brand" href="/"><img class="navbar__logo" src="/img/logo.png" alt="Fur Logo"><strong class="navbar__title">Fur</strong></a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs/">Next</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/docs">文档</a><a class="navbar__item navbar__link" href="/blog">博客</a><a href="https://chinadot.net" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">社区</a></div><div class="navbar__items navbar__items--right"><a href="https://space.bilibili.com/695987967" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">视频</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">工具</a><ul class="dropdown__menu"><li><a target="_blank" rel="noopener noreferrer" class="dropdown__link" position="left">代码生成器</a></li></ul></div><a href="https://gitee.com/monksoul/Fur/board" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">看板</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">仓库</a><ul class="dropdown__menu"><li><a href="https://gitee.com/monksoul/Fur" target="_blank" rel="noopener noreferrer" class="dropdown__link" position="left">Gitee</a></li><li><a href="https://github.com/MonkSoul/Fur" target="_blank" rel="noopener noreferrer" class="dropdown__link" position="left">GitHub</a></li></ul></div><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_2aTZ"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_BsTx">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_BsTx">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/"><img class="navbar__logo" src="/img/logo.png" alt="Fur Logo"><strong class="navbar__title">Fur</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a target="_blank" rel="noopener noreferrer" class="menu__link">Versions</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link navbar__link--active" href="/docs">文档</a></li><li class="menu__list-item"><a class="menu__link" href="/blog">博客</a></li><li class="menu__list-item"><a href="https://chinadot.net" target="_blank" rel="noopener noreferrer" class="menu__link">社区</a></li><li class="menu__list-item"><a href="https://space.bilibili.com/695987967" target="_blank" rel="noopener noreferrer" class="menu__link">视频</a></li><li class="menu__list-item"><a target="_blank" rel="noopener noreferrer" class="menu__link menu__link--sublist">工具</a><ul class="menu__list"><li class="menu__list-item"><a target="_blank" rel="noopener noreferrer" class="menu__link" position="left">代码生成器</a></li></ul></li><li class="menu__list-item"><a href="https://gitee.com/monksoul/Fur/board" target="_blank" rel="noopener noreferrer" class="menu__link">看板</a></li><li class="menu__list-item"><a target="_blank" rel="noopener noreferrer" class="menu__link menu__link--sublist">仓库</a><ul class="menu__list"><li class="menu__list-item"><a href="https://gitee.com/monksoul/Fur" target="_blank" rel="noopener noreferrer" class="menu__link" position="left">Gitee</a></li><li class="menu__list-item"><a href="https://github.com/MonkSoul/Fur" target="_blank" rel="noopener noreferrer" class="menu__link" position="left">GitHub</a></li></ul></li></ul></div></div></div></nav><div class="main-wrapper"><div class="docPage_2gpo"><div class="docSidebarContainer_3_JD" role="complementary"><div class="sidebar_2urC"><div class="menu menu--responsive menu_5FrY"><button aria-label="Open Menu" aria-haspopup="true" class="button button--secondary button--sm menu__button" type="button"><svg aria-label="Menu" class="sidebarMenuIcon_Dm3K" xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 32 32" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><ul class="menu__list"><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">1. 框架介绍</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/">1.1 介绍</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/author">1.2 关于作者</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/source">1.3 源码结构</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/reference">1.4 项目引用</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="/docs/get-start">2. 一分钟入门</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/appstartup">3. 应用启动</a></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">4. 配置与选项</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/configuration">4.1 配置</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/options">4.2 选项</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="/docs/dynamic-api-controller">5. 动态 WebAPI</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/specification-document">6. 规范化接口文档</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/friendly-exception">7. 友好异常处理</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/data-validation">8. 数据校验</a></li><li class="menu__list-item"><a class="menu__link menu__link--sublist menu__link--active" href="#!">9. 数据库操作指南</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext">9.1 数据库上下文</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-locator">9.2 数据库上下文定位器</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/entity">9.3 数据库实体</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-repository">9.4 仓储模式</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-add">9.5 新增操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-update">9.6 更新操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-add-or-update">9.7 新增或更新操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-delete">9.8 删除操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-batch">9.9 批量操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-query">9.10 查询操作</a></li><li class="menu__list-item"><a aria-current="page" class="menu__link menu__link--active active" tabindex="0" href="/docs/dbcontext-hight-query">9.11 高级查询操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-view">9.12 视图操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-proc">9.13 存储过程操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-function">9.14 函数操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-sql">9.15 Sql 操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-sql-template">9.16 Sql 模板</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-sql-proxy">9.17 Sql 高级代理</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-multi-database">9.18 多数据库操作</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-db-first">9.19 数据库生成模型</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-code-first">9.20 模型生成数据库</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-seed-data">9.21 实体种子数据</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-audit">9.22 审计日志</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-filter">9.23 实体/全局查询筛选器</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-Interceptor">9.24 数据库操作拦截器</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/tran">9.25 事务和工作单元</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/dbcontext-read-write">9.26 读写分离/主从复制</a></li><li class="menu__list-item"><a class="menu__link" tabindex="0" href="/docs/split-db">9.27 分表分库</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="/docs/saas">10. SaaS 多租户</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/dependency-injection">11. 依赖注入/控制反转</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/object-mapper">12. 对象数据映射</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/cache">13. 分布式缓存</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/auth-control">14. 安全鉴权</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/cors">15. CORS 跨域</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/view-engine">16. 视图引擎</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/local-language">17. 多语言处理</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/event-bus">18. 事件总线</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/logging">19. 日志记录</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/http">20. 网络请求</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/process-service">21. 进程服务</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/job">22. 任务调度</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/signalr">23. 即时通讯</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/grpc">24. Grpc 服务</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/deploy">25. 托管部署</a></li><li class="menu__list-item"><a class="menu__link" href="/docs/devops">26. 持续部署集成</a></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">27. 测试指南</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/unittest">27.1 单元测试</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/performance">27.2 性能测试</a></li></ul></li><li class="menu__list-item"><a class="menu__link" href="/docs/contribute">28. 贡献指南</a></li><li class="menu__list-item menu__list-item--collapsed"><a class="menu__link menu__link--sublist" href="#!">29. 常见问题</a><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/answer">29.1 常见问题</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/errors">29.2 常见错误</a></li><li class="menu__list-item"><a class="menu__link" tabindex="-1" href="/docs/gooduse">29.3 最佳实践</a></li></ul></li></ul></div></div></div><main class="docMainContainer_3EyW"><div class="container padding-vert--lg docItemWrapper_1EkI"><div class="row"><div class="col docItemCol_2ASc"><div class="docItemContainer_3QWW"><article><header><h1 class="docTitle_1Lrw">9.11 高级查询操作</h1></header><div class="markdown"><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9111-关联数据模型"></a>9.11.1 关联数据模型<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9111-关联数据模型" title="Direct link to heading">#</a></h2><div><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_1w39 tabs__item--active" style="outline:none">Person</li><li role="tab" tabindex="0" aria-selected="false" class="tabs__item tabItem_1w39" style="outline:none">PersonDetail</li><li role="tab" tabindex="0" aria-selected="false" class="tabs__item tabItem_1w39" style="outline:none">Children</li><li role="tab" tabindex="0" aria-selected="false" class="tabs__item tabItem_1w39" style="outline:none">Post</li></ul><div role="tabpanel" class="margin-vert--md"><div><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Fur.DatabaseAccessor;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System.Collections.Generic;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System.ComponentModel.DataAnnotations;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">namespace Fur.Core</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">{</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    public class Person : Entity</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 构造函数</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public Person()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            CreatedTime = DateTime.Now;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            IsDeleted = false;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 姓名</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        [MaxLength(32)]</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public string Name { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 年龄</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public int Age { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 住址</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public string Address { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 从表</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        public PersonDetail PersonDetail { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 一对多</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        public ICollection&lt;Children&gt; Childrens { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 多对多</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        public ICollection&lt;Post&gt; Posts { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">}</span></div></div></div></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9112-一对一查询"></a>9.11.2 一对一查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9112-一对一查询" title="Direct link to heading">#</a></h2><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.Include(u =&gt; u.Detail);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例二</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.Include(u =&gt; u.Detail)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                       .Include(u =&gt; u.Post);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例三</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.Include(u =&gt; u.Detail)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                            .ThenInclude(d =&gt; d.Review)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                       .Include(u =&gt; u.Post);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例四</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.Include(u =&gt; u.Detail.Where(d =&gt; d.Id &gt; 10).OrderBy(d =&gt; d.Name))</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                            .ThenInclude(d =&gt; d.Review)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                       .Include(u =&gt; u.Post);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例五</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.IncludeIf(!string.IsNullOrEmpty(keyword), u =&gt; u.Detail);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例六</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.IncludeIf(!string.IsNullOrEmpty(keyword), u =&gt; u.Detail)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                       .IncludeIf(age &gt; 18), u =&gt; u.Detail.Where(d =&gt; d.Id &gt; 10).OrderBy(d =&gt; d.Name))</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                            .ThenInclude(d =&gt; d.Review)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                       .Include(u =&gt; u.Post);</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9113-一对多查询"></a>9.11.3 一对多查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9113-一对多查询" title="Direct link to heading">#</a></h2><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.Include(u =&gt; u.Childrens);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 参考 一对一 例子</span></div></div></div></div></div><div class="admonition admonition-important alert alert--info"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>特别说明</h5></div><div class="admonition-content"><p><code>一对一</code> 和 <code>一对多</code> 查询方法一样，唯一的区别是：<code>一对多</code> 采用 <code>ICollection&lt;TEntity&gt;</code> 定义属性。</p></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9114-多对多查询"></a>9.11.4 多对多查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9114-多对多查询" title="Direct link to heading">#</a></h2><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var person = repository.Include(u =&gt; u.Posts);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 参考 一对一 例子</span></div></div></div></div></div><div class="admonition admonition-important alert alert--info"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg></span>特别说明</h5></div><div class="admonition-content"><p><code>一对一</code> 和 <code>多对多</code> 查询方法一样，唯一的区别是：<code>多对多</code> 采用 <code>ICollection&lt;TEntity&gt;</code> 定义属性。</p></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9115-联表查询"></a>9.11.5 联表查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9115-联表查询" title="Direct link to heading">#</a></h2><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91151-内连接-inner-join"></a>9.11.5.1 内连接 <code>Inner Join</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#91151-内连接-inner-join" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = from p in _personRepository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            join d in _personDetailRepository.AsQueryable() on p.Id equals d.PersonId</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            select new PersonDto</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                PhoneNumber = p.PersonDetail.PhoneNumber,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Address = p.Address,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Age = p.Age,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Name = p.Name,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Id = p.Id,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                QQ = p.PersonDetail.QQ</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            };</span></div></div></div></div></div><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91152-左连接-left-join"></a>9.11.5.2 左连接 <code>Left Join</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#91152-左连接-left-join" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = from p in _personRepository.AsQueryable()</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">            join d in _personDetailRepository.AsQueryable() on p.Id equals d.PersonId into results</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">            from d in results.DefaultIfEmpty()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            select new PersonDto</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                PhoneNumber = p.PersonDetail.PhoneNumber,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Address = p.Address,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Age = p.Age,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Name = p.Name,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Id = p.Id,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                QQ = p.PersonDetail.QQ</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            };</span></div></div></div></div></div><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>小提示</h5></div><div class="admonition-content"><p><strong><code>Left Join</code></strong> 和 <strong><code>Inner Join</code></strong> 不同的是，<strong><code>Left Join</code></strong> 会先将结果 <strong><code>into</code></strong> 到新的结果集然后再查询，并调用 <strong><code>DefaultIfEmpty()</code></strong> 方法。</p></div></div><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91152-右连接-right-join"></a>9.11.5.2 右连接 <code>Right Join</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#91152-右连接-right-join" title="Direct link to heading">#</a></h3><p><code>Right Join</code> 只需要将 <code>Left Join</code> 主从表位置更换即可。</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9116-分组查询"></a>9.11.6 分组查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9116-分组查询" title="Direct link to heading">#</a></h2><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = repository.AsQueryable().GroupBy(x =&gt; new { x.Column1, x.Column2 });</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例二</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = from student in repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            group student by repository2.AsQueryable() into dateGroup</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            select new ResultData()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Key = dateGroup.Key,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Value = dateGroup.Count()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            };</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例三</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = from a in repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            join b in repository2.AsQueryable() on a.Id equals b.Aid</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            join c in repository3.AsQueryable() on c.id equals b.Bid</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            group emp by new { emp.Age, emp.Sex } into g</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            select new {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Peo = g.Key,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                Count = g.Count()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            };</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9117-合并结果集"></a>9.11.7 合并结果集<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9117-合并结果集" title="Direct link to heading">#</a></h2><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = repository.AsQueryable(u =&gt; u.Id &gt; 10)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .Union(</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                          repository2.AsQueryable(u =&gt; u.Id &lt;= 10)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      );</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9118-查询排序"></a>9.11.8 查询排序<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9118-查询排序" title="Direct link to heading">#</a></h2><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91181-正序"></a>9.11.8.1 正序<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91181-正序" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .OrderBy(u =&gt; u.Id);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例二</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query =repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                     .OrderBy(u =&gt; u.Id)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                     .ThenBy(u =&gt; u.Name);</span></div></div></div></div></div><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91182-倒序"></a>9.11.8.2 倒序<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91182-倒序" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .OrderByDescending(u =&gt; u.Id);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例二</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query =repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                     .OrderByDescending(u =&gt; u.Id)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                     .ThenByDescending(u =&gt; u.Name);</span></div></div></div></div></div><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91183-混合倒序"></a>9.11.8.3 混合倒序<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91183-混合倒序" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .OrderBy(u =&gt; u.Id)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .OrderByDescending(u =&gt; u.Name)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .ThenBy(u =&gt; u.Age);</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="9119-递归查询"></a>9.11.9 递归查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#9119-递归查询" title="Direct link to heading">#</a></h2><div><ul role="tablist" aria-orientation="horizontal" class="tabs"><li role="tab" tabindex="0" aria-selected="true" class="tabs__item tabItem_1w39 tabs__item--active" style="outline:none">City</li><li role="tab" tabindex="0" aria-selected="false" class="tabs__item tabItem_1w39" style="outline:none">CityDto</li></ul><div role="tabpanel" class="margin-vert--md"><div><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Fur.DatabaseAccessor;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Microsoft.EntityFrameworkCore;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Microsoft.EntityFrameworkCore.Metadata.Builders;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System.Collections.Generic;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">namespace Fur.Core</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">{</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    /// 城市</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    /// &lt;/summary&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">    public class City : Entity, IEntityTypeBuilder&lt;City&gt;, IEntitySeedData&lt;City&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 构造函数</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public City()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            CreatedTime = DateTime.Now;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            IsDeleted = false;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 名称</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public string Name { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 上级Id</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public int? ParentId { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 上级</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        public virtual City Parent { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 子集</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        public virtual ICollection&lt;City&gt; Childrens { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 配置实体关系</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;entityBuilder&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;dbContext&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;dbContextLocator&quot;&gt;&lt;/param&gt;</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        public void Configure(EntityTypeBuilder&lt;City&gt; entityBuilder, DbContext dbContext, Type dbContextLocator)</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">        {</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">            entityBuilder</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">                .HasMany(x =&gt; x.Childrens)</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">                .WithOne(x =&gt; x.Parent)</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">                .HasForeignKey(x =&gt; x.ParentId)</span></div><div class="token-line docusaurus-highlight-code-line" style="color:#bfc7d5"><span class="token plain">                .OnDelete(DeleteBehavior.ClientSetNull); // 必须设置这一行</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 种子数据</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;dbContext&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;dbContextLocator&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;returns&gt;&lt;/returns&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public IEnumerable&lt;City&gt; HasData(DbContext dbContext, Type dbContextLocator)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            return new List&lt;City&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                new City { Id=1,CreatedTime =DateTime.Parse(&quot;2020-08-20 15:30:20&quot;),IsDeleted=false,Name=&quot;中国&quot; },</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                new City { Id=2,CreatedTime =DateTime.Parse(&quot;2020-08-20 15:30:20&quot;),IsDeleted=false,Name=&quot;广东省&quot;,ParentId=1 },</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                new City { Id=3,CreatedTime =DateTime.Parse(&quot;2020-08-20 15:30:20&quot;),IsDeleted=false,Name=&quot;中山市&quot;,ParentId=2 },</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                new City { Id=4,CreatedTime =DateTime.Parse(&quot;2020-08-20 15:30:20&quot;),IsDeleted=false,Name=&quot;珠海市&quot;,ParentId=2 },</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                new City { Id=5,CreatedTime =DateTime.Parse(&quot;2020-08-20 15:30:20&quot;),IsDeleted=false,Name=&quot;浙江省&quot;,ParentId=1 },</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            };</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">}</span></div></div></div></div></div></div></div></div><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">var cities = await repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                             .Include(u =&gt; u.Childrens)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                             .Where(u =&gt; u.Id == 1)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                             .ToListAsync();</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var dtos = cities.Adapt&lt;List&lt;CityDto&gt;&gt;();</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91110-动态-sql-查询"></a>9.11.10 动态 <code>Sql</code> 查询<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91110-动态-sql-查询" title="Direct link to heading">#</a></h2><p><code>Fur</code> 默认不支持 动态 <code>Sql</code> 查询功能，不过可以通过第三方实现：</p><p>在 <code>Fur</code> 项目层安装 <code>System.Linq.Dynamic.Core</code> 包 <a href="https://github.com/zzzprojects/System.Linq.Dynamic.Core" target="_blank" rel="noopener noreferrer">https://github.com/zzzprojects/System.Linq.Dynamic.Core</a></p><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="911101-动态-sql"></a>9.11.10.1 动态 <code>Sql</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#911101-动态-sql" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var query = repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .Where(&quot;City == @0 and Orders.Count &gt;= @1&quot;, &quot;China&quot;, 10)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .OrderBy(&quot;CompanyName&quot;)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                      .Select(&quot;new(CompanyName as Name, Phone)&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例二</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var list = repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                     .Where(&quot;Name.Contains(@0)&quot;,&quot;Fur&quot;)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                     .ToList();</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例三，支持 ? 语法</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var customers = repository.AsQueryable()</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                          .Include(c =&gt; c.Location)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                          .Where(c =&gt; c.Location?.Name == &quot;test&quot;) // 注意 Location?.Name</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                          .ToList();</span></div></div></div></div></div><h3><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="911102-动态-lambda"></a>9.11.10.2 动态 <code>Lambda</code><a aria-hidden="true" tabindex="-1" class="hash-link" href="#911102-动态-lambda" title="Direct link to heading">#</a></h3><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例一</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var x = Expression.Parameter(typeof(int), &quot;x&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var y = Expression.Parameter(typeof(int), &quot;y&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var e = DynamicExpressionParser</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            .ParseLambda(new ParameterExpression[] { x, y }, null, &quot;(x + y) * 2&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">// 示例二</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">var e = DynamicExpressionParser.ParseLambda(</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        typeof(Customer), typeof(bool),</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        &quot;City = @0 and Orders.Count &gt;= @1&quot;,</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        &quot;London&quot;, 10);</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91111-性能优化"></a>9.11.11 性能优化<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91111-性能优化" title="Direct link to heading">#</a></h2><p>默认情况下，<code>EF Core</code> 会跟踪所有实体，也就是任何数据改变都会引起数据检查，所以如果只做查询操作，建议关闭实体跟踪功能。</p><p><code>Fur</code> 框架提供了以下高性能实体集合：</p><ul><li><code>DetachedEntities</code>：脱轨/不追踪实体</li><li><code>AsQueryable()</code>：不追踪实体</li><li><code>Entities.AsNoTracking()</code>：手动关闭实体追踪</li></ul><p>在 <code>EF Core</code> 中，复杂查询总是会生成一个 <code>sql</code>，也就是 <code>AsSingleQuery()</code>，我们也可以设置为 <code>AsSplitQuery()</code> 切割成多个查询。</p><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91112-分表查询小例子"></a>9.11.12 分表查询小例子<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91112-分表查询小例子" title="Direct link to heading">#</a></h2><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Fur.DatabaseAccessor;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Microsoft.EntityFrameworkCore;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using Microsoft.EntityFrameworkCore.Metadata.Builders;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">using System.Collections.Generic;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">namespace Fur.Core</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">{</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    public class Person : Entity, IEntityTypeBuilder&lt;Person&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public string Name { get; set; }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain" style="display:inline-block">
</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// 配置实体关系</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;/summary&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;entityBuilder&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;dbContext&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        /// &lt;param name=&quot;dbContextLocator&quot;&gt;&lt;/param&gt;</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        public void Configure(EntityTypeBuilder&lt;City&gt; entityBuilder, DbContext dbContext, Type dbContextLocator)</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        {</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">            entityBuilder.ToSqlQuery(</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">              @&quot;select * from dbo.person.2020-09-19</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                union all</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">                select * from dbo.person.2020-09-20&quot;);</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">        }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">    }</span></div><div class="token-line" style="color:#bfc7d5"><span class="token plain">}</span></div></div></div></div></div><div class="mdxCodeBlock_1XEh"><div class="codeBlockContent_1u-d"><button type="button" aria-label="Copy code to clipboard" class="copyButton_10dd">Copy</button><div tabindex="0" class="prism-code language-cs codeBlock_3iAC"><div class="codeBlockLines_b7E3" style="color:#bfc7d5;background-color:#292d3e"><div class="token-line" style="color:#bfc7d5"><span class="token plain">var posts = repository.Where(u =&gt; u.Id &gt; 10).ToList();</span></div></div></div></div></div><h2><a aria-hidden="true" tabindex="-1" class="anchor enhancedAnchor_2cZh" id="91112-反馈与建议"></a>9.11.12 反馈与建议<a aria-hidden="true" tabindex="-1" class="hash-link" href="#91112-反馈与建议" title="Direct link to heading">#</a></h2><div class="admonition admonition-note alert alert--secondary"><div class="admonition-heading"><h5><span class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="16" viewBox="0 0 14 16"><path fill-rule="evenodd" d="M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"></path></svg></span>与我们交流</h5></div><div class="admonition-content"><p>给 Fur 提 <a href="https://gitee.com/monksoul/Fur/issues/new?issue" target="_blank" rel="noopener noreferrer">Issue</a>。</p></div></div></div></article><div class="margin-vert--xl"><div class="row"><div class="col"><a href="https://gitee.com/monksoul/Fur/tree/main/handbook/docs/dbcontext-high-query.mdx" target="_blank" rel="noreferrer noopener"><svg fill="currentColor" height="1.2em" width="1.2em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 40 40" style="margin-right:0.3em;vertical-align:sub"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div></div></div><div class="margin-vert--lg"><nav class="pagination-nav" aria-label="Blog list page navigation"><div class="pagination-nav__item"><a class="pagination-nav__link" href="/docs/dbcontext-query"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">« 9.10 查询操作</div></a></div><div class="pagination-nav__item pagination-nav__item--next"><a class="pagination-nav__link" href="/docs/dbcontext-view"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">9.12 视图操作 »</div></a></div></nav></div></div></div><div class="col col--3"><div class="tableOfContents_3SO_"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#9111-关联数据模型" class="table-of-contents__link">9.11.1 关联数据模型</a></li><li><a href="#9112-一对一查询" class="table-of-contents__link">9.11.2 一对一查询</a></li><li><a href="#9113-一对多查询" class="table-of-contents__link">9.11.3 一对多查询</a></li><li><a href="#9114-多对多查询" class="table-of-contents__link">9.11.4 多对多查询</a></li><li><a href="#9115-联表查询" class="table-of-contents__link">9.11.5 联表查询</a><ul><li><a href="#91151-内连接-inner-join" class="table-of-contents__link">9.11.5.1 内连接 <code>Inner Join</code></a></li><li><a href="#91152-左连接-left-join" class="table-of-contents__link">9.11.5.2 左连接 <code>Left Join</code></a></li><li><a href="#91152-右连接-right-join" class="table-of-contents__link">9.11.5.2 右连接 <code>Right Join</code></a></li></ul></li><li><a href="#9116-分组查询" class="table-of-contents__link">9.11.6 分组查询</a></li><li><a href="#9117-合并结果集" class="table-of-contents__link">9.11.7 合并结果集</a></li><li><a href="#9118-查询排序" class="table-of-contents__link">9.11.8 查询排序</a><ul><li><a href="#91181-正序" class="table-of-contents__link">9.11.8.1 正序</a></li><li><a href="#91182-倒序" class="table-of-contents__link">9.11.8.2 倒序</a></li><li><a href="#91183-混合倒序" class="table-of-contents__link">9.11.8.3 混合倒序</a></li></ul></li><li><a href="#9119-递归查询" class="table-of-contents__link">9.11.9 递归查询</a></li><li><a href="#91110-动态-sql-查询" class="table-of-contents__link">9.11.10 动态 <code>Sql</code> 查询</a><ul><li><a href="#911101-动态-sql" class="table-of-contents__link">9.11.10.1 动态 <code>Sql</code></a></li><li><a href="#911102-动态-lambda" class="table-of-contents__link">9.11.10.2 动态 <code>Lambda</code></a></li></ul></li><li><a href="#91111-性能优化" class="table-of-contents__link">9.11.11 性能优化</a></li><li><a href="#91112-分表查询小例子" class="table-of-contents__link">9.11.12 分表查询小例子</a></li><li><a href="#91112-反馈与建议" class="table-of-contents__link">9.11.12 反馈与建议</a></li></ul></div></div></div></div></main></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">文档</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/docs/get-start">入门</a></li><li class="footer__item"><a class="footer__link-item" href="/docs">指南</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">社区</h4><ul class="footer__items"><li class="footer__item"><a href="https://gitee.com/monksoul/Fur/issues" target="_blank" rel="noopener noreferrer" class="footer__link-item">讨论</a></li><li class="footer__item"><a href="https://gitee.com/monksoul/Fur/board" target="_blank" rel="noopener noreferrer" class="footer__link-item">看板</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">更多</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/blog">博客</a></li><li class="footer__item"><a href="https://gitee.com/monksoul/Fur" target="_blank" rel="noopener noreferrer" class="footer__link-item">仓库</a></li></ul></div></div><div class="text--center"><div>Copyright © 2020 Fur, Baiqian Co.,Ltd.</div></div></div></footer></div>
<script src="/styles.8352e18a.js"></script>
<script src="/runtime~main.98e14d7d.js"></script>
<script src="/main.04e1b7d6.js"></script>
<script src="/1.72c59440.js"></script>
<script src="/2.a2e0b0a9.js"></script>
<script src="/3.054f69af.js"></script>
<script src="/1be78505.da78ff7d.js"></script>
<script src="/85.0018927c.js"></script>
<script src="/f976f453.e1be0e0e.js"></script>
<script src="/17896441.9aece880.js"></script>
<script src="/4bfcf3ee.d70edafe.js"></script>
</body>
</html>